#include "config.h"
extern char GcRcvBuf_LCD[20];
extern char GcRcvBuf_LCD_1[20];
extern uint32_t value;
void BreakInit()
{
	LPC_GPIO3->IE|=(1<<2);
	LPC_GPIO3->IS&=~(1<<2);
	LPC_GPIO3->IEV&=~(1<<2);
	LPC_GPIO3->IE|=(1<<3);
	LPC_GPIO3->IS&=~(1<<3);
	LPC_GPIO3->IEV&=~(1<<3);
}
void KEYinit()
{
	LPC_GPIO3->DIR &=~(1<<2);
	LPC_GPIO3->DIR &=~(1<<3);
}
void TEMP_NOW_C(float Temp)
{
		sprintf(GcRcvBuf_LCD,"%.2f",Temp);
		LCD_DisplayStr(2,0,"TEMP:");
		LCD_DisplayStr(7,0,GcRcvBuf_LCD);
		LCD_DisplayStr(13,0,"C");
}
void TEMP_NOW_F(float Temp)
{
		Temp=32+Temp*1.8;
		sprintf(GcRcvBuf_LCD,"%.2f",Temp);
		LCD_DisplayStr(2,0,"TEMP:");
		LCD_DisplayStr(7,0,GcRcvBuf_LCD);
		LCD_DisplayStr(13,0,"F");
}
void TEMP_SET_C(uint32_t value)
{
		sprintf(GcRcvBuf_LCD_1,"%d",value);
		LCD_DisplayStr(2,1,"SET:");
		LCD_DisplayStr(7,1,GcRcvBuf_LCD_1);
		LCD_DisplayStr(13,1,"C");
}
void TEMP_SET_F(uint32_t value)
{
		value=32+value*1.8;
		sprintf(GcRcvBuf_LCD_1,"%d",value);
		LCD_DisplayStr(2,1,"SET:");
		LCD_DisplayStr(7,1,GcRcvBuf_LCD_1);
		LCD_DisplayStr(13,1,"F");
}